<div class="main">
	<bid-tabs
	  query-fn="inspectContent.paginationQuery"
	  query-bean="inspectContent.queryData"
	  query-param="bidId"
	  query-type="bid"></bid-tabs>
	<div class="query-info shadowbox">
		<div class="container-header">巡查内容</div>
		<form class="base-info pa-form-content"
			name="queryForm" novalidate>
			<div class="pa-form-control pa-form-control-inline">
			  <label for="name">巡查名称：</label>
			  <input type="text"
			    ng-model="inspectContent.queryData.taskName">
			</div>
			<div class="pa-form-control pa-form-control-inline">
			  <label for="name">内容来源：</label>
			  <select name="checkClassfy"
			  	ng-model="inspectContent.queryData.taskType">
			  	<option value=""></option>
			  	<option value="1">日常巡查</option>
			  	<option value="0">平安考核</option>
			  </select>
			</div>
			<div class="pa-form-control pa-form-control-inline">
			  <label for="name">巡查结果：</label>
			  <select name="checkUnit"
			  	ng-model="inspectContent.queryData.checkResult">
			  	<option value=""></option>
			  	<option value="0" ng-selected="inspectContent.queryData.checkResult == 0">不符合要求</option>
			  	<option value="1">符合要求</option>
			  </select>
			</div>
			<div class="pa-form-control pa-form-control-inline">
			  <label for="name">状态：</label>
			  <select name="checkResult"
			  	ng-model="inspectContent.queryData.problemStatus">
			  	<option value=""></option>
			  	<option value="0">待整改</option>
			  	<option value="1">待审核</option>
			  	<option value="2">已完成</option>
			  </select>
			</div>
			<div class="pa-form-control pa-form-control-inline">
				<label>提交时间：</label>
				<input type="text" ng-datepicker name="startTime"  
					ng-model="inspectContent.queryData.problemFoundTimeFrom">
					到
				<input type="text" ng-datepicker name="endTime"
				  ng-model="inspectContent.queryData.problemFoundTimeTo">
			</div>
		</form>
		<div class="btn-outer-right">			
			<a class="pa-btn"
				ng-click="inspectContent.query(queryForm)">
				<i class="fa fa-search"></i>
				<span class="ml5">查询</span>
			</a>
			<a class="pa-btn reset-btn"
				ng-click="inspectContent.reset()">
				<i class="fa fa-repeat"></i>
				<span class="ml5">重置</span>
			</a>		
		</div>
	</div>
	<div class="pa-table-container shadowbox">
		<form class="base-info">
			<table class="pa-table">
				<thead>
					<tr>
						<th>内容来源</th>
						<th>巡查记录</th>
						<th>内容编号</th>
						<th>巡查标段</th>
						<th>巡查分类</th>
						<th>巡查单位</th>
						<th>内容提交时间</th>
						<th>整改期限</th>
						<th>巡查结果</th>
						<th>状态</th>
						<th style="width: 113px;">操作</th>
					</tr>
				</thead>
				<tbody>
					<tr ng-repeat="item in inspectContent.inspectContentList">
						<td>{{item.taskType ? '日常巡查' : '平安考核'}}</td>
						<td>{{item.taskName}}</td>
						<td>{{item.contentNumber}}</td>
						<td>{{item.bidName}}</td>
						<td>{{item.checkClassifyName}}</td>
						<td>{{item.role == '0' ? '指挥部' : 
									item.role == '1' ? '总监办' :
									item.role == '2' ? '项目部' : ''}}</td>
						<!-- <td>{{item.responsibilityUnit}}</td> -->
						<td>{{item.problemFoundTime1}}</td>
						<td>{{item.problemDeadline1}}</td>
						<td>
              {{item.problemStatus == 3 ? '符合要求' : '不符合要求'}}
						</td>
						<td ng-class="{'nostart': item.problemStatus == '0',
								'ongoing': item.problemStatus == '1',
            		'has-complete': item.problemStatus == '2'}">
              {{item.problemStatus == 0 ? '待整改' :
              	item.problemStatus == 1 ? '待审核' :
              	item.problemStatus == 2 ? '已完成' :
              	item.problemStatus == 3 ? '符合要求' : ''}}
						</td>
						<td>
							<div class="del"
								authorization-btn="api/checkRecord/app/queryContentDetail"
								ng-click="inspectContent.checkDetail(item.problemId)">
								<i class="fa fa-street-view color"></i>
								<span>查看</span>									
							</div>
							<div class="del"
								authorization-btn="api/securityActivities/checkProblem/deleteCheckProblem"
								ng-click="inspectContent.deleteInspectContent(item.problemId)">
								<i class="fa fa-trash color"></i>
								<span>删除</span>
							</div>									
						</td>
					</tr>
				</tbody>
			</table>
		</form>
		<div class="total-num">
		  共计<span class="total-num-colorful">
		  {{inspectContent.paginationData.total}}</span>条
		</div>
		<!-- 分页 -->
    <div class="pagination-outer">
      <uib-pagination
        total-items="inspectContent.paginationData.total"
        ng-model="inspectContent.paginationData.pageNum"
        items-per-page="inspectContent.paginationData.pageSize"
        ng-change="pageChange()"
        class="pagination-sm"
        boundary-link-numbers="true"
        max-size="5"
        next-text="下一页"
        previous-text="上一页"></uib-pagination>
    </div>
	</div> 
</div>